﻿//***********************************************************************
// Assembly         : IGolovkine.AoA.Tcp.Channels.Http
// Author           : Ilia
// Created          : 06-11-2011
//
// Last Modified By : Ilia
// Last Modified On : 01-10-2010
// Description      : 
//
// Copyright        : (c) Microsoft. All rights reserved.
//***********************************************************************
using System;
using System.Net;

namespace IGolovkine.AoA.Tcp.Channels.Http
{
    public class HttpChannelClientConfiguration : IConfiguration<IMessageChannel>
    {
        public HttpChannelClientConfiguration()
        {
            this.MinPollInterval = TimeSpan.FromSeconds(0.25);
            this.IdleModeTrigger = TimeSpan.FromSeconds(30);
            this.MaxPollInterval = TimeSpan.FromSeconds(30);
        }

        public IWebProxy Proxy { get; set; }
        public string ServerUrl { get; set; }

        public TimeSpan MinPollInterval { get; set; }
        public TimeSpan MaxPollInterval { get; set; }
        public TimeSpan IdleModeTrigger { get; set; }

        public IMessageChannel CreateInstance()
        {
            return new HttpChannelClient(this);
        }
    }
}
